package cn.sunxyz.core.bean.plugin;

import cn.sunxyz.common.utils.reflect.ReflectionUtil;

import java.util.Objects;

/**
 * Created by yangrd on 2017/5/22.
 */
public class DefaultPlugin extends AbstractPlugin {
    @Override
    public Object createTarget(Class<?> targetClazz, Object target) {
        if (Objects.isNull(target)) {
            return ReflectionUtil.invokeConstructor(targetClazz);
        }
        return target;
    }
}
